From: Florian Müllner Date: Fri, 20 Sep 2019 19:08:45 +0000 (+0200) Subject: shellDBus: Don't assume devices have a node X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~811^2^2~6 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e00878ab7510939f56c58a24b85a68776e59a353;p=gnome-shell.git shellDBus: Don't assume devices have a node Clutter.InputDevice.get_device_node() may return null. Handle that case when building the 'AcceleratorActivated' vardict parameter. https://gitlab.gnome.org/GNOME/gnome-shell/issues/1641 --- diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index e750c207f..fca0b6425 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -151,9 +151,13 @@ var GnomeShell = class { let connection = this._dbusImpl.get_connection(); let info = this._dbusImpl.get_info(); let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()), - 'device-node': GLib.Variant.new('s', device.get_device_node()), 'timestamp': GLib.Variant.new('u', timestamp), 'action-mode': GLib.Variant.new('u', Main.actionMode) }; + + let deviceNode = device.get_device_node(); + if (deviceNode) + params['device-node'] = GLib.Variant.new('s', deviceNode); + connection.emit_signal(destination, this._dbusImpl.get_object_path(), info ? info.name : null,